<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>signup</title>
    <link rel="stylesheet" type="text/css" th:href="@{/signup.css}">
</head>
<body>
<div class="register">
    <div class="head">
        <strong>注册</strong>
        <div class="left">
            <span>已有账号？</span>
            <a href="https://gitee.com/login">登录</a>
        </div>
    </div>
    <form action="/user/signup" th:object="${userForm}">
        <div>
            <input type="text" class="email" name="email" placeholder="请输入工作邮箱" th:field="*{email}">

            <p th:if="${#fields.hasErrors('email')}" th:errors="*{email}"></p><div class="nick"></div>
        </div>
        <div>
            <input type="text"  class="verifCode" name="verImg" placeholder="验证码">
            <a href="javascript:reloadCaptcha()"><img class="captchaImg" id="captchImg" src="/captcha"/></a>
            <div class="nick"></div>
        </div>
        <div>
            <input type="text" class="mailVerif" name="emailCode" placeholder="请输入邮箱验证码">
            <a id="getCode" href="#">获取验证码</a><span>收不到邮件？</span>
            <div class="nick"></div>
        </div>
        <div>
            <input type="text" th:field="*{name}" name="name" class="name" placeholder="姓名">
            <p th:if="${#fields.hasErrors('name')}" th:errors="*{name}"></p>
            <div class="nick"></div>
        </div>
        <div>
            <div class="domain">http://gitee.com</div>
            <input type="text" th:field="*{domain}" name="domain"  placeholder="个性域名" class="verifCode">
            <p th:if="${#fields.hasErrors('domain')}" th:errors="*{domain}"></p>
            <div class="nick"></div>
        </div>
        <div>
            <input type="password" th:field="*{psd}" class="psd" name="psd" placeholder="密码不少于六位">
            <p th:if="${#fields.hasErrors('psd')}" th:errors="*{psd}"></p>
            <div class="nick" ></div>
            <div class="nick"></div>
            <div class="nick"></div>
        </div>
        <span>
         <input type="checkbox" class="checkbox">
    </span>

        <span>
        已阅读并同意
    <a href="">使用条款</a>
        以及
    <a href="">非活跃装好处理规范</a>
    </span>
        <button>注册</button>
    </form>
    <footer>
        <img src="" alt=""><span>使用OSChina账号登录</span>
        <div>其他登录方式</div>
    </footer>
</div>
<div class="nick"></div>
</body>
<script src="../static/js/jquery.1.9.1.min.js"></script>
<script th:src="@{/signup.js}"></script>
<script>
    document.getElementById("getCode").addEventListener("clicks",function (e) {
        var  email=document.getElementById("email").value;
        fetch("/senfmail?email="+email);
    })
</script>
</html>